home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglnormalpointer.z / fglnormalpointer
Encoding:
Text File  |  2002-10-03  |  14.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr - define an array of normals
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr( INTEGER*4 _t_y_p_e,
  14.                                   INTEGER*4 _s_t_r_i_d_e,
  15.                                   CHARACTER*8 _p_o_i_n_t_e_r )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _t_y_p_e     Specifies the data type of each coordinate in the array.
  20.               Symbolic constants GGGGLLLL____BBBBYYYYTTTTEEEE, GGGGLLLL____SSSSHHHHOOOORRRRTTTT, GGGGLLLL____IIIINNNNTTTT, GGGGLLLL____FFFFLLLLOOOOAAAATTTT, and
  21.               GGGGLLLL____DDDDOOOOUUUUBBBBLLLLEEEE are accepted. The initial value is GGGGLLLL____FFFFLLLLOOOOAAAATTTT.
  22.  
  23.      _s_t_r_i_d_e   Specifies the byte offset between consecutive normals. If _s_t_r_i_d_e
  24.               is 0- the initial value-the normals are understood to be tightly
  25.               packed in the array.  The initial value is 0.
  26.  
  27.      _p_o_i_n_t_e_r  Specifies a pointer to the first coordinate of the first normal
  28.               in the array. The initial value is 0.
  29.  
  30. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  31.      ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr specifies the location and data format of an array of
  32.      normals to use when rendering.  _t_y_p_e specifies the data type of the
  33.      normal coordinates and _s_t_r_i_d_e gives the byte stride from one normal to
  34.      the next, allowing vertices and attributes to be packed into a single
  35.      array or stored in separate arrays.  (Single-array storage may be more
  36.      efficient on some implementations; see ffffggggllllIIIInnnntttteeeerrrrlllleeeeaaaavvvveeeeddddAAAArrrrrrrraaaayyyyssss.)  When a
  37.      normal array is specified, _t_y_p_e, _s_t_r_i_d_e, and _p_o_i_n_t_e_r are saved as
  38.      client-side state.
  39.  
  40.      To enable and disable the normal array, call ffffggggllllEEEEnnnnaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee and
  41.      ffffggggllllDDDDiiiissssaaaabbbblllleeeeCCCClllliiiieeeennnnttttSSSSttttaaaatttteeee with the argument GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY. If enabled, the
  42.      normal array is used when ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, or
  43.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt is called.
  44.  
  45.      Use ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss to construct a sequence of primitives (all of the same
  46.      type) from prespecified vertex and vertex attribute arrays.  Use
  47.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt to specify primitives by indexing vertices and vertex
  48.      attributes and ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss to construct a sequence of primitives by
  49.      indexing vertices and vertex attributes.
  50.  
  51. NNNNOOOOTTTTEEEESSSS
  52.      ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr is available only if the GL version is 1.1 or greater.
  53.  
  54.      The normal array is initially disabled and isn't accessed when
  55.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss, or ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss is called.
  56.  
  57.      Execution of ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr is not allowed between ffffggggllllBBBBeeeeggggiiiinnnn and the
  58.      corresponding ffffggggllllEEEEnnnndddd, but an error may or may not be generated. If an
  59.      error is not generated, the operation is undefined.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr is typically implemented on the client side.
  75.  
  76.      Since the normal array parameters are client-side state, they are not
  77.      saved or restored by ffffggggllllPPPPuuuusssshhhhAAAAttttttttrrrriiiibbbb and ffffggggllllPPPPooooppppAAAAttttttttrrrriiiibbbb.  Use
  78.      ffffggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb and ffffggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb instead.
  79.  
  80. EEEERRRRRRRROOOORRRRSSSS
  81.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is not an accepted value.
  82.  
  83.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_t_r_i_d_e is negative.
  84.  
  85. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  86.      ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY
  87.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____TTTTYYYYPPPPEEEE
  88.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____SSSSTTTTRRRRIIIIDDDDEEEE
  89.      ffffggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv with argument GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____PPPPOOOOIIIINNNNTTTTEEEERRRR
  90.  
  91.  
  92. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  93.      On RealityEngine, RealityEngine2, and VTX systems, do not enable or
  94.      disable GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____VVVVEEEERRRRTTTTEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY,
  95.      GGGGLLLL____NNNNOOOORRRRMMMMAAAALLLL____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY, GGGGLLLL____CCCCOOOOLLLLOOOORRRR____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT,
  96.      GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY,GGGGLLLL____IIIINNNNDDDDEEEEXXXX____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY,
  97.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT, GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY or GGGGLLLL____EEEEDDDDGGGGEEEE____FFFFLLLLAAAAGGGG____AAAARRRRRRRRAAAAYYYY____EEEEXXXXTTTT
  98.      between a call to ffffggggllllNNNNeeeewwwwLLLLiiiisssstttt and the corresponding call to ffffggggllllEEEEnnnnddddLLLLiiiisssstttt.
  99.      Instead, enable or disable before the call to ffffggggllllNNNNeeeewwwwLLLLiiiisssstttt.
  100.  
  101.      On InfiniteReality systems it is particularly important to minimize the
  102.      amount of data transferred from the application to the graphics pipe,
  103.      since the host-to-pipe bandwidth limit can cause a performance
  104.      bottleneck.  One way to reduce the amount of data transferred per vertex
  105.      is to use properly-aligned byte and short data types whenever possible.
  106.      Accordingly, the EEEEXXXXTTTT____vvvveeeerrrrtttteeeexxxx____aaaarrrrrrrraaaayyyy extension on InfiniteReality systems
  107.      has been optimized for vertex information packed into the following data
  108.      structures.  (Note: v represents vertex coordinates, c represents color
  109.      components, n represents normal coordinates, and t represents texture
  110.      coordinates.  Normals must have unit length.)
  111.  
  112.           struct {GLfloat v[3];}
  113.           struct {GLubyte c[4]; GLfloat v[3];}
  114.           struct {GLshort n[3]; GLfloat v[3];}
  115.           struct {GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  116.           struct {GLshort t[2]; GLfloat v[3];}
  117.           struct {GLshort t[2]; GLubyte c[4]; GLfloat v[3];}
  118.           struct {GLshort t[2]; GLshort n[3]; GLfloat v[3];}
  119.           struct {GLshort t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  120.           struct {GLfloat t[2]; GLfloat v[3];}
  121.           struct {GLfloat t[2]; GLubyte c[4]; GLfloat v[3];}
  122.           struct {GLfloat t[2]; GLshort n[3]; GLfloat v[3];}
  123.           struct {GLfloat t[2]; GLubyte c[4]; GLshort n[3]; GLfloat v[3];}
  124.  
  125.      Application-specific fields may be added to these structures, provided
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ffffggggllllNNNNoooorrrrmmmmaaaallllPPPPooooiiiinnnntttteeeerrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.      that all the fields described above retain their relative order and word
  141.      alignment.
  142.  
  143.      An additional constraint applies when ffffggggllllTTTTeeeexxxxGGGGeeeennnn is being used.  The
  144.      implementation normally generates all four texture coordinates in
  145.      parallel, and must take special action to generate just a subset of the
  146.      four coordinates.  Therefore performance is best when none of the texture
  147.      coordinates are being generated, or when all of them are being generated.
  148.      For example, when using 2D texturing (generating s and t coordinates) it
  149.      will be faster to enable texture coordinate generation for the r and q
  150.      coordinates as well as s and t.  Choose a texture generation mode of
  151.      GGGGLLLL____OOOOBBBBJJJJEEEECCCCTTTT____LLLLIIIINNNNEEEEAAAARRRR and use the plane equations (0,0,0,0) and (0,0,0,1) for
  152.      r and q, respectively.
  153.  
  154.      Using these structures on InfiniteReality systems can improve performance
  155.      considerably, compared to structures in which all values are single-
  156.      precision floating point.
  157.  
  158.  
  159. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  160.      ffffggggllllAAAArrrrrrrraaaayyyyEEEElllleeeemmmmeeeennnntttt, ffffggggllllCCCCoooolllloooorrrrPPPPooooiiiinnnntttteeeerrrr, ffffggggllllDDDDrrrraaaawwwwAAAArrrrrrrraaaayyyyssss, ffffggggllllDDDDrrrraaaawwwwEEEElllleeeemmmmeeeennnnttttssss,
  161.      ffffggggllllEEEEddddggggeeeeFFFFllllaaaaggggPPPPooooiiiinnnntttteeeerrrr, ffffggggllllEEEEnnnnaaaabbbblllleeee, ffffggggllllGGGGeeeettttPPPPooooiiiinnnntttteeeerrrrvvvv, ffffggggllllIIIInnnnddddeeeexxxxPPPPooooiiiinnnntttteeeerrrr,
  162.      ffffggggllllIIIInnnntttteeeerrrrlllleeeeaaaavvvveeeeddddAAAArrrrrrrraaaayyyyssss, ffffggggllllPPPPooooppppCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb, ffffggggllllPPPPuuuusssshhhhCCCClllliiiieeeennnnttttAAAAttttttttrrrriiiibbbb,
  163.      ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrddddPPPPooooiiiinnnntttteeeerrrr, ffffggggllllVVVVeeeerrrrtttteeeexxxxPPPPooooiiiinnnntttteeeerrrr
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.